package com.mo.controller;

import com.mo.command.ServiceCommand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import java.util.Map;

@RestController
public class CommandController {
    @Autowired
    private RestTemplate restTemplate;

    @RequestMapping("find/{id}")
    public Map find(@PathVariable Long id){
        return new ServiceCommand(restTemplate,id).execute();
    }







}
